import request from '@/utils/request'

//IP黑名单信息 相关接口

// 列表
export function listBlack(data) {
  return request({
    url: '/web/ip/black/list',
    method: 'post',
    data: data
  })
}

// 详细
export function getBlack(id) {
  return request({
    url: '/web/ip/black/detail/' + id,
    method: 'get'
  })
}

// 新增
export function addBlack(data) {
  return request({
    url: '/web/ip/black/add',
    method: 'post',
    data: data
  })
}

// 修改
export function updateBlack(data) {
  return request({
    url: '/web/ip/black/modify',
    method: 'put',
    data: data
  })
}
// 启用禁用
export function changeBlack(id) {
  return request({
    url: '/web/ip/black/status/change/' + id,
    method: 'put'
  })
}

// 删除
export function delBlack(id) {
  return request({
    url: '/web/ip/black/delete/' + id,
    method: 'delete'
  })
}
// 批量删除
export function delbatchBlack(id) {
  return request({
    url: '/web/ip/black/delete/batch' + id,
    method: 'delete'
  })
}





//菜单 相关接口

// 删除
export function delMenu(id) {
  return request({
    url: '/web/menu/delete/' + id,
    method: 'delete'
  })
}
// 批量删除
export function delbatchMenu(id) {
  return request({
    url: '/web/menu/delete/batch' + id,
    method: 'delete'
  })
}
// 列表
export function listMenu(query) {
  return request({
    url: '/web/menu/list',
    method: 'get',
    params: query,
    data: query
  })
}

// 详细
export function getMenu(id) {
  return request({
    url: '/web/menu/detail/' + id,
    method: 'get'
  })
}

// 新增
export function addMenu(data) {
  return request({
    url: '/web/menu/add',
    method: 'post',
    data: data
  })
}

// 修改
export function updateMenu(data) {
  return request({
    url: '/web/menu/modify',
    method: 'put',
    data: data
  })
}
// 启用禁用
export function changeMenu(id) {
  return request({
    url: '/web/menu/status/change/' + id,
    method: 'put'
  })
}




//员工信息 相关接口

// 删除
export function delEmployee(id) {
  return request({
    url: '/web/employee/delete/' + id,
    method: 'delete'
  })
}
// 批量删除
export function delbatchEmployee(id) {
  return request({
    url: '/web/employee/delete/batch' + id,
    method: 'delete'
  })
}
// 列表
export function listEmployee(query) {
  return request({
    url: '/web/employee/list',
    method: 'get',
    params: query
  })
}

// 详细
export function getEmployee(id) {
  return request({
    url: '/web/employee/detail/' + id,
    method: 'get'
  })
}

// 新增
export function addEmployee(data) {
  return request({
    url: '/web/employee/add',
    method: 'post',
    data: data
  })
}

// 修改
export function updateEmployee(data) {
  return request({
    url: '/web/employee/modify',
    method: 'put',
    data: data
  })
}
// 启用禁用
export function changeEmployee(id) {
  return request({
    url: '/web/employee/status/change/' + id,
    method: 'put'
  })
}
// 修改密码
export function editPasswordEmployee(data) {
  return request({
    url: '/web/employee/password/edit',
    method: 'put',
    data: data
  })
}

// 注销
export function forbidEmployee(id) {
  return request({
    url: '/web/employee/status/forbid/'+ id,
    method: 'put',
  })
}






//风控规则信息 相关接口

// 删除
export function delRiskRules(id) {
    return request({
      url: '/web/risk/control/rules/delete/' + id,
      method: 'delete'
    })
  }
  // 批量删除
  export function delbatchRiskRules(id) {
    return request({
      url: '/web/risk/control/rules/delete/batch' + id,
      method: 'delete'
    })
  }
  // 列表
  export function listRiskRules(query) {
    return request({
      url: '/web/risk/control/rules/list',
      method: 'get',
      params: query
    })
  }
  
  // 详细
  export function getRiskRules(id) {
    return request({
      url: '/web/risk/control/rules/detail/' + id,
      method: 'get'
    })
  }
  
  // 新增
  export function addRiskRules(data) {
    return request({
      url: '/web/risk/control/rules/add',
      method: 'post',
      data: data
    })
  }
  
  // 修改
  export function updateRiskRules(data) {
    return request({
      url: '/web/risk/control/rules/modify',
      method: 'put',
      data: data
    })
  }
  // 启用禁用
  export function changeRiskRules(id) {
    return request({
      url: '/web/risk/control/rules/status/change/' + id,
      method: 'put'
    })
  }
  
